package com.atguigu.cart.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author ShiJieLin
 * @Date 2022/4/26 21:58
 * @Version 1.0
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {

    /** 远程调用获取商品信息
     * @param skuId 商品ID
     * @return
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    R getSkuInfoBySkuId(@PathVariable("skuId") Long skuId);

    /** 根据SkuId获取商品的销售属性
     * @param skuId
     * @return
     */
    @GetMapping("/product/skusaleattrvalue/getSkuSaleAttr/{skuId}")
    List<String> getSkuSaleAttr(@PathVariable Long skuId);
}
